home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "SYSEX1"
- Option Explicit
-
- Global Const MODAL = 1
-
- Sub MIDIInOpen()
- Dim wRtn As Integer
-
- If frmMain.MIDIInput1.State >= MIDISTATE_OPEN Then
- ' Close midiin port
- frmMain.MIDIInput1.Action = MIDIIN_CLOSE
-
- 'Turn off the MIDI Filtering
- frmMain.MIDIInput1.Filter(FILTER_F9) = False
- frmMain.MIDIInput1.Filter(FILTER_ACTIVE_SENSE) = False
- frmMain.MIDIInput1.Filter(FILTER_CLOCK) = False
- End If
-
-
- ' Get selected device id
- frmMain.MIDIInput1.DeviceID = MIDISetupForm.ComboMidiIn.ListIndex
-
- ' Open midi in
- frmMain.MIDIInput1.Action = MIDIIN_OPEN
-
- 'Turn on some MIDI Filtering
- frmMain.MIDIInput1.Filter(FILTER_F9) = True
- frmMain.MIDIInput1.Filter(FILTER_ACTIVE_SENSE) = True
- frmMain.MIDIInput1.Filter(FILTER_CLOCK) = True
-
- End Sub
-
- Sub MIDIOutOpen()
-
- If frmMain.MIDIOutput1.State >= MIDISTATE_OPEN Or frmMain.MIDIOutput1.DeviceID = -1 Then
- ' Close
- frmMain.MIDIOutput1.Action = MIDIOUT_CLOSE
- End If
-
- ' Open selected device
- frmMain.MIDIOutput1.DeviceID = MIDISetupForm.ComboMidiOut.ListIndex - 1
- frmMain.MIDIOutput1.Action = MIDIOUT_OPEN
-
- End Sub
-
-